﻿using System;
using StructureMap;

namespace Smugmug.Tests
{
    public static class Bootstrapper
    {
        public static void Execute()
        {
            ConfigureStructureMap();
        }

        private static void ConfigureStructureMap()
        {
            StructureMapConfiguration.AddInstanceOf<IProtocol>()
                .UsingConcreteType<JsonProtocol>();
            StructureMapConfiguration.AddInstanceOf<IWebClient>()
                .UsingConcreteType<WebClient>();
            StructureMapConfiguration.AddInstanceOf<SmugmugClient>()
                .UsingConcreteType<SmugmugClient>()
                .WithProperty("version").EqualTo(Config.ServiceVersion);
            StructureMapConfiguration.AddInstanceOf<ILogger>()
                .UsingConcreteType<NLogLogger>();
        }
    }
}